<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="/static/css/iconfont.css">
    <link rel="stylesheet" href="/static/css/input.css">
    <script src="/static/js/jquery1_12_4.min.js"></script>
    
    <script type="text/javascript" charset="utf-8" src="/static/js/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="/static/js/ueditor/ueditor.all.js"> </script>
    <!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
    <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
    <script type="text/javascript" charset="utf-8" src="/static/js/ueditor/lang/zh-cn/zh-cn.js"></script>
</head>
<body>
    <form action="/nav/admin/saveart.html" method="POST" enctype="multipart/form-data">
        <span>标题</span><input type="text" name="title" id="" value=""><br>
        <span>栏目</span>
        <select name="sid" >
            {volist name='sec' id='val'}
            {if $sid==$key}
            <option value="{$key}" selected>{$val}</option>
            {else /}
            <option value="{$key}">{$val}</option>
            {/if}
            {/volist}
        </select>
        <script id="editor" type="text/plain" style="width:1024px;height:500px;"></script>
        <script>
            var ue = UE.getEditor('editor');
            function setDisabled() {
                UE.getEditor('editor').setDisabled('fullscreen');
                disableBtn("enable");
            }

            function setEnabled() {
                UE.getEditor('editor').setEnabled();
                enableBtn();
            }
            function getLocalData () {
                alert(UE.getEditor('editor').execCommand( "getlocaldata" ));
            }

            function clearLocalData () {
                UE.getEditor('editor').execCommand( "clearlocaldata" );
                alert("已清空草稿箱")
            }

        </script>
        <div id="btns">
                <div id="enable" onclick="setEnabled()">可以编辑</div>
                <div onclick="setDisabled()">不可编辑</div>
                <div onclick=" UE.getEditor('editor').setHide()">隐藏编辑器</div>
                <div onclick=" UE.getEditor('editor').setShow()">显示编辑器</div>
                <div onclick="getLocalData()" >获取草稿箱内容</div>
                <div onclick="clearLocalData()" >清空草稿箱</div>
            <input type="submit" value="提交">
        </div>
    </form>
    
</body>
</html>